<!doctype html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
  <title>城乡计划</title>
  <!-- Bootstrap -->
  <link th:insert="common/head :: commonheader">

</head>
<!--<body class="login-body">-->
<body style="background-color: #F5F6FA">
<div class="container">
  <div class="row clearfix">
    <div class="col-md-12 column">
      <div th:insert="common/head :: header">
      </div>
      <div class="jumbotron" style="background-color: #fff; margin-bottom: 5px; border: 1px solid #eeeeee;">
        <p>
          城乡应聘网介绍:城乡应聘网的面向群体主要是基层人民,为基层人民选择正确合适自己的工作是我们是目标，平台优势是为全体人民免费发布招工/找活，操作简单，方便，没有任何不必要手续。
        </p>
        <div class="search_form">
          <form class="form-inline" th:action="@{/search}" method="post">
            <select class="form-control" style="height: 45px;" name="option">
              <option value="0">找工作</option>
              <option value="1">找工人</option>
            </select>
            <div class="form-group ">
              <input type="text" class="search_input" id="exampleInputEmail3" placeholder="找工、找活" name="address">
            </div>
            <button type="submit" class="btn btn-default">搜索</button>
          </form>
        </div>
      </div>
    </div>
  </div>

  <div class="row">
    <div class="col-md-12">
      <nav class="navbar  navbar-default" role="navigation" style="margin-bottom: 8px;">
        <div class="navbar-header">
          <a class="navbar-brand" href="#">招工信息</a>
        </div>

        <ul class="nav navbar-nav navbar-right">
          <li style="padding-right: 30px">
            <a th:href="@{/findwork/}">更多></a>
          </li>
        </ul>
      </nav>
    </div>
  </div>


  <div class="row ">
    <div class="col-md-4 column box-box" th:each="work:${page.list}">
      <a href="" style="text-decoration: none" th:href="@{'/toBoss/'+ ${work.getId()}}">
        <div class="box-work" >
          <p>
            <span th:text="${work.getTitle().length()<14?work.getTitle():work.getTitle().substring(0,14)+'...'}"></span>
            <span class="glyphicon glyphicon-fire" th:if="${work.getState()==0}">正在招</span>
            <span class="glyphicon glyphicon-fire" th:if="${work.getState()==1}" style="color: #6b6969">已招满</span>
          </p>
          <p th:text="${work.getPublishTime()}"></p>
          <p th:text="${work.getWorkDescribe().length()<50?work.getWorkDescribe():work.getWorkDescribe().substring(0,50)}+'...'" style="height: 50px;"></p>
          <div>
            <img th:src="@{'/user/' + ${work.getUser().getUserImg()}}" style="width: 40px; height: 40px;" alt="">
            <span th:text="${work.getUser().getRealName()}"></span>
          </div>
        </div>
      </a>
    </div>
  </div>
  <button style="display: none" id="guide" data-toggle="modal" data-target="#guideUser" class="btn"></button>
  <footer th:insert="common/head :: footer">

  </footer>

  <div class="modal fade" id="guideUser" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
          <h4 class="modal-title" id="ModalLabel">选择</h4>
        </div>
        <div class="modal-body" style="height: 200px;">
          <span style="font-size: 16px">请选择你的身份:</span>
          <div class="text-center" style="margin-top: 20px;">
            <button style="margin-right: 120px;font-size: 24px; font-weight: bold;" data-toggle="modal" data-target="#saveWMsg" class="btn btn-success">工人<br>找工作</button>
            <button style="font-size: 24px; font-weight: bold;" data-toggle="modal" data-target="#saveCMsg" class="btn btn-primary">老板<br>招工人</button>
          </div>
        </div>
        <div class="modal-footer">
        </div>
      </div><!-- /.modal-content -->
    </div><!-- /.modal -->
  </div>
</div>

<div class="modal fade" id="saveWMsg" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title" id="ModalLabel1">完善个人资料</h4>
      </div>
      <div class="modal-body" style="height: 400px;">
        <form th:action="@{/updateWFirstUser}" class="form-horizontal" role="form" method="post">
          <div class="form-group">
            <label for="firstname" class="col-sm-2 control-label">姓名</label>
            <div class="col-sm-10">
              <input name="realName" type="text" class="form-control" id="firstname" placeholder="请输入姓名">
            </div>
          </div>
          <div class="form-group">
            <label for="one" class="col-sm-2 control-label">年龄</label>
            <div class="col-sm-10">
              <input name="age" type="text" class="form-control" id="one" placeholder="请输入年龄">
            </div>
          </div>
          <div class="form-group">
            <label for="two" class="col-sm-2 control-label">手机号</label>
            <div class="col-sm-10">
              <input name="phone" type="text" class="form-control" id="two" placeholder="请输入手机号">
            </div>
          </div>
          <div class="form-group">
            <label for="lastname" class="col-sm-2 control-label">身份证</label>
            <div class="col-sm-10">
              <input name="idCard" type="text" class="form-control" id="lastname" placeholder="请输入身份证">
            </div>
          </div>
          <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
              <button type="submit" class="btn btn-default">提交</button>
            </div>
          </div>
        </form>
      </div>
      <div class="modal-footer">
      </div>
    </div><!-- /.modal-content -->
  </div><!-- /.modal -->
</div>
<div class="modal fade" id="saveCMsg" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title" id="ModalLabel01">完善个人资料</h4>
      </div>
      <div class="modal-body" style="height: 400px;">
        <form th:action="@{/updateCFirstUser}" class="form-horizontal" role="form" method="post">
          <div class="form-group">
            <label for="firstname" class="col-sm-2 control-label">姓名</label>
            <div class="col-sm-10">
              <input name="realName" type="text" class="form-control" id="fistname" placeholder="请输入姓名">
            </div>
          </div>
          <div class="form-group">
            <label for="ne" class="col-sm-2 control-label">年龄</label>
            <div class="col-sm-10">
              <input name="age" type="text" class="form-control" id="ne" placeholder="请输入年龄">
            </div>
          </div>
          <div class="form-group">
            <label for="to" class="col-sm-2 control-label">手机号</label>
            <div class="col-sm-10">
              <input name="phone" type="text" class="form-control" id="to" placeholder="请输入手机号">
            </div>
          </div>
          <div class="form-group">
            <label for="latname" class="col-sm-2 control-label">身份证</label>
            <div class="col-sm-10">
              <input name="idCard" type="text" class="form-control" id="latname" placeholder="请输入身份证">
            </div>
          </div>
          <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
              <button type="submit" class="btn btn-default">提交</button>
            </div>
          </div>
        </form>
      </div>
      <div class="modal-footer">
      </div>
    </div><!-- /.modal-content -->
  </div><!-- /.modal -->
</div>
<script>

  onload = function () {
    let g = document.getElementById("guide")
    g.click()
  }

</script>
</body>
</html>